//package com.csw.springbootquartz.task.scheduletaskTest.a1;
//
//
//import com.csw.springbootquartz.service.SchedulerJobService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.TaskScheduler;
//import org.springframework.scheduling.config.CronTask;
//import org.springframework.scheduling.config.ScheduledTaskRegistrar;
//import org.springframework.scheduling.support.CronTrigger;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.lang.reflect.AnnotatedType;
//import java.lang.reflect.Method;
//import java.lang.reflect.Parameter;
//
///**
// * @author wl
// * @date 2022/3/22
// */
//@Slf4j
//@RestController
//@RequestMapping("/test")
//public class TestController {
//
//    @Autowired
//    private SchedulerJobService schedulerJobService;
//
//
//
//    private final ScheduleTask scheduleTask;
//
//    @Autowired
//    public TestController(ScheduleTask scheduleTask) {
//        this.scheduleTask = scheduleTask;
//    }
//
//    @RequestMapping("/updateCron")
//    public String updateCron(String id,String cron,String running) throws NoSuchMethodException {
//        log.error("new cron :{}", cron);
//        id = "a823f7054ac640c7a4ed0fef4e994c06";
//        scheduleTask.setCron(cron);
//        scheduleTask.setRunning(running);
//        schedulerJobService.updateCronById(id,cron,running);
//        return "ok";
//    }
//}
//
